package cn.bone.gateway.bean;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by superbone on 2017/3/30.
 */
@Entity("apiMethod")
public class ApiMethod {

    @Id
    private String id;
    /**接口标记*/
    private String sign;
    /**接口类名*/
    private String className;
    /**接口方法*/
    private String methodName;
    /**参数对象的泛型类型*/
    private String paramName;
    /**接口是否缓存,如果接口缓存,直接调用redis获取数据*/
    private boolean cacheable;
    /**是否可用*/
    private boolean usable;
    /**允许的用户访问来源ios,android,javaWeb 等*/
    private List<String> allowAccess = new ArrayList<>();
    /**描述*/
    private String description;
    /**创建时间*/
    private Date createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public boolean isCacheable() {
        return cacheable;
    }

    public void setCacheable(boolean cacheable) {
        this.cacheable = cacheable;
    }

    public boolean isUsable() {
        return usable;
    }

    public void setUsable(boolean usable) {
        this.usable = usable;
    }

    public List<String> getAllowAccess() {
        return allowAccess;
    }

    public void setAllowAccess(List<String> allowAccess) {
        this.allowAccess = allowAccess;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
